package cn.tedu.submarine;

import javax.swing.*;

public class BattleShip extends SeaObject{
    private int life;
    public BattleShip(){
        super(66,26,270,124,20);
        life =5;
    }
    public void move(){
    }
    public void moveRight(){
        x+=speed;
    }
    public void moveLeft(){
        x-=speed;
    }
    public ImageIcon getImage(){
        return Images.battleship;
    }
    public Bomb shootBomb(){
        return new Bomb(this.x,this.y);

    }
    public Bomb2 shootBomb2(){
        return new Bomb2(this.x,this.y);
    }
    public NuclearBomb shootn(){
        return new NuclearBomb(this.x,this.y);
    }
    public void addLife(int num){
        life +=num;
    }
    public int getLife(){
        return life;
    }
    public void subtractLife(){
        life--;
    }
    public void subtractLife2(){
        life-=2;
    }



}
